package chapter4;

public class ContinueTest {
    public static void main(String[] args) {
        testContinue2();
    }

    public static void testContinue1() {
        for (int i = 0; i < 3; i++) {
            System.out.println("i的值是:" + i);
            if(i == 1) {
                continue;
            }
            System.out.println("continue之后的输出语句");
        }
    }

    public static void testContinue2() {
        outer:
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 3; j++) {
                System.out.println("i的值是:" + i + " j的值为:" + j);
                if(j == 1) {
                    continue outer;
                }
            }
        }
    }
}
